using UnityEngine;
using System.Collections;

public class CutPatch : MonoBehaviour
{

	// Use this for initialization
	void Start ()
    {
	
	}
	
	// Update is called once per frame
	void Update ()
    {
	
	}

    public void moveLeft()
    {
        float x = Input.GetAxis("Horizontal") * Time.deltaTime * (-2);

        if (this.transform.position.x + x > 1)
        {
            x = 1 - this.transform.position.x;
        }

        if (this.transform.position.x + x < -1)
        {
            x = -1 - this.transform.position.x;
        }

        this.transform.Translate(new Vector3(x, 0, 0));
    }
}
